<?php
/*!
Application_Model_Contact
REQUIRES db.php

*/

require("db.php");

class Application_Model_Contact {
	
	public function get_all_contacts()
	{
		//! Returns associative array of all contacts.\n
		
		$qstring = "SELECT contact_name, contact_id FROM contact ORDER BY contact_name";
		$result = mysql_query($qstring);
		$compiledContacts = array();
		
		//DELETE THIS COMMENT WHEN CHANGED -- NEEDS OTHER DATA IN RETURN
		while($contact = mysql_fetch_assoc($result)){
			array_push($compiledContacts,$contact);
		}
		return $compiledContacts;
	}
}
	
	
	
	
	
